# !/usr/bin/env python
# -*- coding: utf-8 -*-
# @File  : 服务端方法1：HTTP keep-Alive.py
# @Author: dongguangwen
# @Date  : 2025-01-05 9:59
from flask import Flask, Response

app = Flask(__name__)


@app.route('/')
def keep_alive():
    response = Response('This is a keep-alive response.')
    response.headers['Connection'] = 'keep-alive'
    return response


if __name__ == '__main__':
    app.run()
